enum Status {
  Uploading,
  Success,
  Failed
}
// console.log(Status.Uploading);

enum Message {
  Error = 'Sorry, error',
  Success = 'Hoho, success',
  Failed = Error
}

// console.log(Message.Failed);

enum Result {
  Faild = 0,
  Success = 'success'
}

// 1. enum E { A }
// 2. enum E { A = 'a' }
// 3. enum E { A = -1 } 

enum Animals {
  Dog = 1,
  Cat = 2
}

interface Dog {
  type: Animals.Dog
}

const dog: Dog = {
  type: Animals.Dog
}


// string | number 联合枚举类型

enum Status2 {
  Off,
  On
}

interface Ligth {
  status: Status2
}

const light: Ligth = {
  status: Status2.Off
}


const enum Animals1{
  Dog = 1,
}

const dog1 = Animals1.Dog

console.log(dog1);  // Animals1.Dog直接展示的是1
